//
//  FRBookReadViewController+AdContent.m
//  Fresh Reading
//
//  Created by Annie on 2020/5/25.
//  Copyright © 2020 Annie. All rights reserved.
//

#import "FRBookReadViewController+AdContent.h"

@implementation FRBookReadViewController (AdContent)



/// 根据Index创建 广告VC
/// @param indexPath 页码信息
- (FRReadAdContentViewController *)adContentVCWithIndexPath:(NSIndexPath *)indexPath{
    FRChapterModel *cModel = self.model.chapters[indexPath.section];
    FRReadContentModel *pModel = cModel.readContents[indexPath.row];
    return [self adContentVCWithPageModel:pModel];
}

/// 根据模型创建广告VC
/// @param pModel 分页模型
- (FRReadAdContentViewController *)adContentVCWithPageModel:(FRReadContentModel *)pModel{
 
    FRReadAdContentViewController *vc = [FRReadAdContentViewController new];
    vc.fr_model = pModel;
    return vc;
}


@end
